package vn.net.click.faces.controller;

import java.util.ArrayList;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.ManagedProperty;
import javax.faces.bean.RequestScoped;

import vn.net.click.model.User;
import vn.net.click.service.ManagementService;

@ManagedBean(name = "userController", eager = true)
@RequestScoped
public class UserController {
	@ManagedProperty(value = "#{managementService}")
	private ManagementService managementService;

	public ManagementService getManagementService() {
		return managementService;
	}

	public void setManagementService(ManagementService managementService) {
		this.managementService = managementService;
	}

	public ArrayList<User> getUsers() {

		return managementService.getAllUsers();
	}
}
